package cn.kami.dao.proxy;

import cn.kami.dao.IBatInDAO;
import cn.kami.dao.impl.BatInDAOImpl;
import cn.kami.dbc.DatabaseConnection;
import cn.kami.factory.DatabaseConnectionFactory;
import cn.kami.vo.BatIn;

public class BatInDAOProxy implements IBatInDAO{
	private DatabaseConnection dbc = null;
	private BatInDAOImpl dao = null;
	public BatInDAOProxy()throws Exception{
		this.dbc = DatabaseConnectionFactory.getOracleDatabaseConnection();
		this.dao = new BatInDAOImpl(this.dbc.getConnection());
	}
	@Override
	public boolean doCreate(BatIn bi) throws Exception {
		// TODO Auto-generated method stub
		boolean flag = false;
		try{
			flag = this.dao.doCreate(bi);
		}catch(Exception e){
			throw e;
		}finally{
			this.dbc.close();
		}
		return flag;
	}

}
